<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../static/vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- v-once 当前标签及内容只会渲染一次 -->
    <div v-once>{{num}}</div>
    <button @click="handleNum">+++</button>

    <!-- v-html 渲染html模板 -->
    <div v-html="content"></div>
  </div>
  <script src="../static/vue.js"></script>
  <script>
    const app = Vue.createApp({
      data() {
        return {
          num: 0,
          content: '<div style="color:red">哈哈哈</div>',
        }
      },
      methods: {
        handleNum() {
          this.num++
        }
      }
    })
    app.mount('#app')
  </script>
</body>

</html>